import request from '@/utils/request'

//查询该用户的全部收货地址
export const searchReceivePlaceService = () => {
    return request.get("/ReceivePlace/searchReceivePlace");
}

//添加收货地
export const addReceivePlaceService = (data: any) => {
    return request.post('/ReceivePlace/addReceivePlace', data);
}

//更新收货地
export const updateReceivePlaceService = (old_receivePlace: any, new_receivePlace: any) => {
    return request.post('/ReceivePlace/updateReceivePlace',
         {'oldReceivePlace': old_receivePlace, 'newReceivePlace': new_receivePlace}
        );
}

//删除收货地
export const deleteReceivePlaceService = (data: any) => {
    return request.post('/ReceivePlace/deleteReceivePlace', data);
}